package streams

import (
	"github.com/docker/docker/pkg/term"
	"io"
)

// In 是DockerCli用来读取用户输入的输入流
// In is an input stream used by the DockerCli to read user input
type In struct {
	commonStream
	in io.ReadCloser
}

// NewIn returns a new In object from a ReadCloser
func NewIn(in io.ReadCloser) *In {
	fd, isTerminal := term.GetFdInfo(in)
	return &In{commonStream: commonStream{fd: fd, isTerminal: isTerminal}, in: in}
}
